package com.dt.dubai.core.comm;

import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class PageParameterData {

    //每页记录数
    private int pSize = 10;

    // 页码数
    private int pNum = 1;

    // 启始记录数
    private int sRows = 0;

    // 启始记录数
    private int eRows = 10;

    // {{key:'字段名', value:'查询条件',opertion=:'连接符'},{}}
    // 字段名 较检时 参数的字段名查询 较检值
    //列表数据
    private List<PageCondition> paramList = new ArrayList<>();

    public PageParameterData() {
    }

    public PageParameterData(final int pNum, final int pSize) {
        this.pNum = pNum;
        this.pSize = pSize;
        this.sRows = (pNum - 1) * pSize + 1;
        this.eRows = pNum * pSize;
    }

}
